
// import show_loading from '../../atom-web/show-loading';
// import hide_loading from '../../atom-web/hide-loading';
import { IFeidaoAiBrowserComponent } from '@dfeidao/atom-web/interfaces';
import get from '@dfeidao/atom-web/local/get';
import remove from '@dfeidao/atom-web/local/remove';
import nodejs from '@dfeidao/atom-web/msg/nodejs';
import render from '@dfeidao/atom-web/render/render';
import p001 from './p001';
import p005 from './p005';

export default async function a015(fd: IFeidaoAiBrowserComponent) {
	const page_no = get(fd, 'page_no') as number;

	const prid = get(fd, 'productid');
	const query = {
		filter: {
			productid: prid
		},
		page_no,
		page_size: 10
	};
	// show_loading();
	// const data = await nodejs<{ dataArray: object, count: number, page_no: number, page_size: number }>(url, './permissions/role_type_find2', query, false, false);
	const data = await nodejs<{ count: number; dataArray: object[]; page_size: number; page_no: number }>('role-type/zj-000009/s001', query);
	// hide_loading();
	render(fd, data.dataArray, p001, 'p001', 'inner');
	data.page_no = page_no;
	data.page_size = 10;

	remove(fd, 'tname');
	render(fd, data, p005, 'p005', 'inner');
}
